import request from '@/request/request.js'

//班级查询所有
export function findAll_class(data){
    return request({
        url:'/groupTwo/class/findAll',
        method:'post',
        data
    })
}
//通过班级id查询班级信息
export function findClassById(classId){
    return request({
        url:'/groupTwo/class/findClassById/'+classId,
        method:'get',
    })
}

//通过班级来查询班级内的学生
export function findStudentByClass(data){
    return request({
        url:'/groupTwo/class/findStudentByClass',
        method:'post',
        data
    })
}
//添加修改班级  
export function addOrUpdaclass(data){
    return request({
        url:'/groupTwo/class/addOrEdit',
        method:'post',
        data
    })
}
//删除班级   
export function delclass(classId){
    return request({
        url:'/groupTwo/class/deleteBatch/'+classId,
        method:'delete',
    })
}

//班级导出
export function download(){
    return request({
        url:'/groupTwo/class/download',
        method:'get',
        responseType:'blob'
    })
}
//阶段查询所有   
export function levelall(){
    return request({
        url:'/groupTwo/class/findStageAll',
        method:'get',
    })
}
//老师查询所有   
export function allteacher(){
    return request({
        url:'/groupTwo/class/findTeacherAll',
        method:'get',
    })
}
//学生调班         /changeclass/fuserId}/{classId}
export function changeclass(userId,classId){
    return request({
        url:'/groupTwo/class/changeClass/'+userId+"/"+classId,
        method:'get',
    })
}
//从班级里删除学生
export function removestudent(userId){
    return request({
        url:'/groupTwo/class/removeStudent/'+userId,
        method:'get',
    })
}   
//查询具体阶段
export function findStage(stageId){
    return request({
        url:'/groupTwo/class/findStage/'+stageId,
        method:'get',
    })
} 
